//
//  ConnectModel.h
//  DAY18_综合讲解
//
//  Created by wanli on 14/12/18.
//  Copyright (c) 2014年 wanli. All rights reserved.
//

#import <Foundation/Foundation.h>

//@protocol ConnectModelDelegate <NSObject>
//
//- (void)connectFinish:(NSData *)data;
//
//@end

typedef void(^ConnectBlock)(NSData *data);


@interface ConnectModel : NSObject<NSURLConnectionDataDelegate>
@property (retain, nonatomic) NSMutableData *data;
//@property (nonatomic, assign) id<ConnectModelDelegate>delegate;
@property (nonatomic, retain) NSString *urlName;
@property (nonatomic, copy) ConnectBlock finished;

//+ (void)connectModelWithUrl:(NSString *)str parmaters:(NSDictionary *)parmaters delegate:(id<ConnectModelDelegate>)delegate;
+ (void)connectModelWithUrl:(NSString *)str parmaters:(NSDictionary *)parmaters finished:(ConnectBlock)finishedBlock;
@end
